/*
 * @Author: Even
 * @Date: 2023-11-28 20:12:03
 * @LastEditors: Even
 * @LastEditTime: 2023-12-28 20:33:57
 * @FilePath: \opencos\include\customer\customer_member_rank.h
 * @Description:
 */
#ifndef OPENCOS_CUSTOMER_MEMBER_RANK_H
#define OPENCOS_CUSTOMER_MEMBER_RANK_H

#include <string>

enum class MemberRank
{
    NOT_MEMBER = 0,
    PRIMARY_MEMBER,
    INTERMEDIATE_MEMBER,
    ADVANCED_MEMBER,
};

float get_discount(MemberRank rank);
MemberRank get_rank_from_consumption(float consumption);

namespace Convert
{
void        String2MemberRank(const std::string &str, MemberRank &rank);
void        MemberRank2String(const MemberRank &rank, std::string &str);
std::string MemberRank2String(const MemberRank &rank);
}

#endif
